//
//  KDocumentCommandDTO.m
//  KutulusLaw
//
//  Created by Mahmood1 on 12/10/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "KDocumentCommandDTO.h"

@implementation KDocumentCommandDTO

- (id)initWithSessionID:(NSString *)sessionID {
    self = [super initWithSessionID:sessionID];
	
    if (self) {
		self.action = kAPI_DOCUMENTS_ACTION;

    }
	
    return self;
}



- (void)setFileType:(NSInteger)fileType {
	if (fileType > eDocumentFileTypeMP3) {
		return;
	}
	
	_fileType = fileType;
	
	switch (self.fileType) {
		case eDocumentFileTypeNone:
			self.fileTypeText = kVALUE_FILE_TYPE_NONE;
			break;
		case eDocumentFileTypeNoFile:
			self.fileTypeText = kVALUE_FILE_TYPE_NO_FILE;
			break;
		case eDocumentFileTypeAny:
			self.fileTypeText = kVALUE_FILE_TYPE_ANY;
			break;
		case eDocumentFileTypePDF:
			self.fileTypeText = kVALUE_FILE_TYPE_PDF;
			break;
		case eDocumentFileTypePPT:
			self.fileTypeText = kVALUE_FILE_TYPE_PPT;
			break;
		case eDocumentFileTypeXLS:
			self.fileTypeText = kVALUE_FILE_TYPE_XLS;
			break;
		case eDocumentFileTypeVIDEO:
			self.fileTypeText = kVALUE_FILE_TYPE_VIDEO;
			break;
		case eDocumentFileTypeDOC:
			self.fileTypeText = kVALUE_FILE_TYPE_DOC;
			break;
		case eDocumentFileTypeMP3:
			self.fileTypeText = kVALUE_FILE_TYPE_MP3;
			break;
		default:
			self.fileTypeText = kVALUE_FILE_TYPE_ANY;
			break;
	}
}


- (void)reset {
	[super reset];
	
	[self setFileType:eDocumentFileTypeNone];
}
@end
